package com.calsoft.Hops_Mobile_Tablet;
/*
 * User: Minh Diep
 * Date: 7/1/13
 * Time: 1:50 PM
 */

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

public class DealsFragment extends Fragment {

    DealsSectionsPagerAdapter dealsSectionsPagerAdapter;
    ViewPager viewPager;

    public DealsFragment() {
        // Empty constructor required for fragment subclasses
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View rootView = inflater.inflate(R.layout.fragment_deals, container, false);
        getActivity().setTitle("Deals");
        return rootView;
    }

    @Override
    public void onViewCreated(View view, Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        dealsSectionsPagerAdapter = new DealsSectionsPagerAdapter(getChildFragmentManager());
        viewPager = (ViewPager) view.findViewById(R.id.pager);
        viewPager.setAdapter(dealsSectionsPagerAdapter);
    }

    @Override
    public void onStop() {
        super.onStop();
    }
}
